<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <script>
        var a=1;
        console.log(a);
        console.log(window.a);

        function f1() {
            var b=1;
            c=2;
        }
        f1();
        // console.log(b);
        console.log(c);

        console.log(d);
        var d=5;
        
        f4();
        function f4() {
            console.log('f4');
        }
    </script>
</body>
</html>